

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit Taxa</title>
    </head>
    <body>
        <div class="nav">
           
            <span class="menuButton"><g:link class="list" action="list">Listar Taxas</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">Nova Taxa</g:link></span>
        </div>
        <div class="body">
            <h1>Edit Taxa</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${taxa}">
            <div class="errors">
                <g:renderErrors bean="${taxa}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <input type="hidden" name="id" value="${taxa?.id}" />
                <div class="dialog">
                    <table>
                        <tbody>
						
							<tr class="prop">
                                <td valign="top" class="name">
                                    <label for="inicioVigencia">Nome:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:taxa,field:'nomeTaxa','errors')}">
                                     <input type="text" id="nomeTaxa" name="nomeTaxa" value="${fieldValue(bean:taxa,field:'nomeTaxa')}" />
                                </td>
                            </tr>
							
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="inicioVigencia">Inicio Vigencia:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:taxa,field:'inicioVigencia','errors')}">
                                    <g:datePicker precision="day" name="inicioVigencia" value="${taxa?.inicioVigencia}" ></g:datePicker>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <lable for="fimVigencia" id="label_setFimVigencia"> <a href="#">Definir Fim Vigencia:</a></label>
                                </td>
                                <td id="td_fimVigencia" valign="top" class="value ${hasErrors(bean:taxa,field:'fimVigencia','errors')}" >
                                    <g:datePicker precision="day" name="fimVigencia" value="${taxa?.fimVigencia}" noSelection="['':'']"></g:datePicker>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="tipo">Tipo:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:taxa,field:'tipo','errors')}">
                                    <g:select id="tipo" name="tipo" from="${taxa.constraints.tipo.inList.collect{it.encodeAsHTML()}}" value="${fieldValue(bean:taxa,field:'tipo')}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="valor">Valor:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:taxa,field:'valor','errors')}">
                                    <input type="text" id="valor" name="valor" value="${fieldValue(bean:taxa,field:'valor')}" />
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="Update" value="Atualizar" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Tem certeza?');" action="Delete" value="Excluir" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
